// 模型相关类型
export interface Model {
  id: string;
  name: string;
  type: 'large' | 'small';
  architecture: string;
  version: string;
  status: 'training' | 'ready' | 'published' | 'archived';
  accuracy: number;
  size: string;
  framework: string;
  createdAt: string;
  lastTrained: string;
  deploymentType: 'cloud' | 'edge' | 'both';
  description: string;
  tags: string[];
}

export interface ModelsResponse {
  models: Model[];
  pagination: {
    total_count: number;
    page: number;
    page_size: number;
    total_pages: number;
    has_next: boolean;
    has_prev: boolean;
  };
  summary: {
    [key: string]: number;
  };
}

// 通用API响应类型
export interface APIResponse<T = any> {
  code: number;
  message: string;
  data: T;
  timestamp: string;
}

// 错误响应类型
export interface APIError {
  code: number;
  message: string;
  details?: string;
}

// 基础响应类型
export interface ApiResponse<T = any> {
  success: boolean;
  message?: string;
  data?: T;
}

// 错误响应类型
export interface ApiError {
  success: false;
  message: string;
  code?: string;
  details?: any;
}

// 日志相关类型
export interface LogEntry {
  timestamp: string;
  level: string;
  logger: string;
  message: string;
  module?: string;
  function?: string;
  line?: number;
}

export interface TaskLogResponse {
  task_id: string;
  log_file_path: string;
  total_lines: number;
  file_size: string;
  logs: LogEntry[];
  last_modified?: string;
}

export interface TaskLogRequest {
  start_line?: number;
  end_line?: number;
  max_lines?: number;
  level_filter?: string;
} 